import request from "@/utils/request";

// 获取网校列表
export function getSchoolList(page) {
  return request({
    url: "/admin/school",
    method: "get",
    params: {
      page
    }
  });
}

// 添加网校
export function addSchool(name) {
  return request({
    url: "/admin/school/save",
    method: "post",
    data: { name }
  });
}

// 查看网校
export function readSchool(id) {
  return request({
    url: "/admin/s/school/read",
    method: "get",
    params: { id }
  });
}

// 编辑网校
export function editSchool(data) {
  return request({
    url: "/admin/s/school/update",
    method: "post",
    data
  });
}
